package com.googlecode.stockhamster.expert;

import java.util.Random;

public class Expert implements IExpert {
	private static final Double interestRate = 0.02;

	@Override
	public Long evaluation(Long totalAssets, Integer issueSize,
			Double profitMargin, Double industryGrowRate) {
		Double profits = totalAssets * profitMargin * (1 + interestRate)
				/ interestRate;
		Double stockPrice = (totalAssets + profits) / issueSize
				* (1 + (double) (new Random().nextInt(40) - 20) / 1000);
		return stockPrice.longValue();
	}
}
